package com.fly.uaa.exceptionhandler;

import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

@com.fasterxml.jackson.databind.annotation.JsonSerialize(using = CustomOauth2ExceptionSerializer.class)
public class CustomOauth2Exception extends OAuth2Exception {
    private String OAuth2ErrorCode;

    public CustomOauth2Exception(String OAuth2ErrorCode, String msg) {
        super(msg);
        this.OAuth2ErrorCode = OAuth2ErrorCode;
    }

    @Override
    public String getOAuth2ErrorCode() {
        return OAuth2ErrorCode;
    }
}
